package com.sounou.lombok.simple;

import lombok.NonNull;

/**
 * <p> 作用在参数上， </p>
 *
 * @author zengneng@hsyuntai.com
 * @date 2019/3/18 19:57
 * @copyright 版权归 HSYUNTAI 所有
 */
public class NonNullDemo {
    private String name;
    private int age;


    void foo(@NonNull String a) {
//        if (a == null) {
//            throw new NullPointerException("a is marked @NonNull but is null");
//        }
        System.out.println(a);
    }
}
